﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using zjxj_repair.Bean;
using zjxj_repair.Utils;

namespace zjxj_repair.WindowsForm.Modal
{
    public partial class RepairOkBack : Form
    {
        public RepairOkBack()
        {
            InitializeComponent();
            Tools.SetWatermark(backTextBox, "请输入原因！");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string text = backTextBox.Text;

            if (string.IsNullOrEmpty(text) || text.Equals("请输入原因！"))
            {
                MessageBox.Show("不可为空！", "未完成", MessageBoxButtons.OK, MessageBoxIcon.Error);

                StaticBean.isBack = false;
            }
            else
            {
                StaticBean.Back = text;

                StaticBean.isBack = true;

                Tools.SetWatermark(backTextBox, "请输入原因！");

                Close();
            }
        }
    }
}
